package com.service.impl;

import com.dao.ChannelDao;
import com.entity.Channel;
import com.service.ChannelServer;
import com.util.sql.PageModel;

public class ChannelServerImpl implements ChannelServer  {
    ChannelDao dao = new ChannelDao();
    @Override
    public Channel add(Channel chan) {
        return dao.save(chan);
    }

    @Override
    public int del(Channel chan) {
        return dao.del(chan);
    }

    @Override
    public int update(Channel chan) {
        Channel old = new Channel();
        old.setChanID(chan.getChanID());
        old = dao.get(old);
        return dao.update(old,chan);
    }

    @Override
    public PageModel queryPage(int page, int size, Channel channel) {
        return null;
    }

}
